import Vue from "vue"
import Vuex from "vuex"
Vue.use(Vuex);

let defaultCity = localStorage.city || "西安";

const state = {
  city:defaultCity
};

const mutations = {
  changeCity(state,cityName){
    localStorage.city = cityName;
    state.city = cityName;
  }
};

export default new Vuex.Store({
  state,
  mutations
})
